/**
 * Continue current exercise if not yet finished
 * 
 * @author Gerd Wagner
 */
oa.ctrl.continueCurrentExercise = function() {
  var curEx = oa.currentExercise;
  oa.view.showSmilingAri();
  if (oa.exerciseProblemCounter < curEx.numberOfProblems) {
    oa.previousProblem = oa.currentProblem;
    oa.learningUnitProblemCounter++;
    oa.exerciseProblemCounter++;
    for (var i=1; i<4; i++) {  // try up to 3 times in case of repetitions
      oa.currentProblem = (curEx.isBasicExercise) ? 
          curEx.generateBasicProblem() : curEx.problemType.generateProblem();
      if ( !oa.currentProblem.equals( oa.previousProblem)) break;
    }
    oa.attemptCounter = 1;
    oa.view.fill( oa.currentProblem, curEx.renderingForm);
  } else {  // End of current exercise 
    if (document.body.classList.contains("stars")) { oa.view.rf.animatedStars.resetStyle(); }
    oa.ctrl.continueCurrentLearningUnit();
  }
};
